<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>游戏新闻</title>
  <link rel="stylesheet" type="text/css" href="/lib/layui/css/layui.css">
  <link rel="stylesheet" type="text/css" href="/css/global.css">
</head>
<body>

<div id="app">
  <!--头部导航栏-->
  <div class="layui-layout layui-layout-admin">
    <div class="layui-header">
      <ul class="layui-nav">
        <li class="layui-nav-item"><a href="/pages/index.html"><img src="/img/gamehub.png"></a></li>
        <li class="layui-nav-item"><a></a></li>

        <li class="layui-btn layui-btn-radius layui-btn-warm">
          <a href="/pages/news.html">新闻</a>
        </li>
        <li class="layui-nav-item"><a></a></li>

        <li class="layui-btn layui-btn-radius layui-btn-primary">
          <a href="/pages/game.html">游戏</a>
        </li>
        <!--<li class="layui-nav-item"><a ></a></li>-->

        <!--<li class="layui-btn layui-btn-radius layui-btn-warm">-->
        <!--<a href="javascript:void(0);" class="login" >新闻</a>-->
        <!--</li>-->

      </ul>
      <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
          <input type="text" ref="game" lay-verify="title" autocomplete="off" placeholder="文明" class="layui-input">
        </li>

        <li class="layui-nav-item"><a @click="gotoGame()"><img src="/img/search.png" style="cursor:pointer"></a></li>
        <span v-if="userName==null">
                <li class="layui-nav-item">
                    <a href="/pages/userLogin.html" target="_blank" class="login">登录</a>
                </li>

                <li class="layui-nav-item">
                    <a href="/pages/userRegiste.html" target="_blank" class="enroll">注册</a>
                </li>
                </span>
        <span v-if="userName!=null">
                <li class="layui-nav-item">
                    <a>{{userName}}</a>
                </li>

                <li class="layui-nav-item">
                    <a @click="logout()" style="cursor:pointer">退出</a>
                </li>
                </span>
      </ul>
    </div>
  </div>
</div>

<br><br>
<div id="newsDetail" style="width: 900px;margin:auto;">

    <!--{{newsDetails}}-->
    <a style="font-size:25px; color:#FFA500;">{{newDetail.title}}</a>
    <br>
    <a>@作者: {{newsDetails[2].username}}写于 {{formatDate(newsDetails[0].lastmodifiedtime)}} </a>
    <br><br>

    &nbsp;&nbsp;
    <a>{{newsDetails[1].detail}}</a>

</div>
<script src="/lib/layui/layui.js"></script>
<script src="/lib/js/vue.js"></script>
<script src="/lib/js/axios.min.js"></script>
<script src="/js/index.js"></script>
<script src="/js/newsDetail.js"></script>
</body>
</html>